﻿using PowerHub.MES.Entities.BasicData;
using PowerHub.MES.Entities.ProductPlanning;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;

namespace PowerHub.MES.Entities.Production;

/// <summary>
/// 生产工单明细BOM
/// </summary>
[Table("Production_BillOfMaterials")]
public partial class Production_BillOfMaterials : BaseEntity
{
    /// <summary>
    /// 工单Id
    /// </summary>
    public string? Production_WorkOrderId { get; set; }

    /// <summary>
    /// 原料Id
    /// </summary>
    public string? MaterialsId { get; set; }

    /// <summary>
    /// 计量单位id
    /// </summary>
    public string? MeasuringUnitId { get; set; }

    /// <summary>
    /// 预计使用量
    /// </summary>
    public int? PredictQuantity { get; set; }
    /// <summary>
    /// 已经分配量
    /// </summary>
    public int? AllocatedQuantity { get; set; } = 0;


    //public virtual Production_WorkOrder? WorkOrderBill { get; set; }
    public virtual ProductPlanning_Material? Materials { get; set; }
    public virtual BasicData_MeasuringUnit? MeasuringUnit { get; set; }
}
